home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
85
/
4thf83.doc
next >
Wrap
Text File
|
1986-07-13
|
6KB
|
146 lines
Forth-83 for the Atari ST
This public-domain Forth model closely follows the 16 bit Forth-
83 implementation written by Henry Laxen and Michael Perry. Of
course, some changes were neccessary for F83 to work on the Atari
ST computers. This version was modified by George Morison.
List of files:
F83.TOS This is Forth, compiled and ready to run.
READ.ME The file you are reading. It explains all
potential bugs and Atari specific features.
I recommend reading this file completely
before downloading the following files.
KERNEL.TOS This is the bare-bones version of Forth used
for re-extending the system.
EXTEND.BLK Contains the file interface.
KERNEL.BLK The kernel blocks. Used by the meta-compiler
for generating a new kernel.
META.BLK The meta-compiler program.
UTIL.BLK Contains code for the editor, decompiler, and
printer words. Rename to UTILITY.BLK
CPU68.BLK The forth assembler and low-level routines
used by the debugger and multi-tasker.
Rename to CPU68000.BLK
TRAPS.BLK Just a few of the Atari xbios calls.
---- For Beginners
If you are new to Forth, the first thing you should do is get a
copy of "Starting Forth", by Leo Brodie. This will aquaint you
with the Forth language and the usual way of doing things such as
editing.
In fact, the editor in F83 is identical to the one described by
Brodie, so you should have little difficulty learning it. Also,
F83 has the word "NEW" which allows some full-screen editing
functions.
F83 is written in Forth and has the ability to recompile itself
into a new version whenever desired. You will need the source
screen files to accomplish this (listed above). These files
offer excellent instruction on the Forth language and make up the
reference manual for the Laxen and Perry Forth model. For
further reading on F83, consult "Inside F83", by C. H. Ting PhD,
available from the Forth Interest Group (FIG), P.O. Box 8231, San
Jose, CA 95155. FIG is a good source for books on Forth pro-
gramming and FIG members receive "Forth Dimensions" bi-monthly.
---- Atari ST specifics
HEADER has been changed to include a small loader program for
forth. When you run F83.TOS, it relocates to $10000 * BANK (a
constant in kernel.blk 1 & 22) + $500. Make sure BANK is set for
where you want forth to load. The loader is not intelligent so
you might have problems if it tries to write over itself.
BDOS and BIOS are gone. They have been replaced with TRAP#1,
TRAP#13, and TRAP#14. These are found in kernel.blk 44. They
make no attempt to clean the stack after execution. This must be
taken care of in the calling word.
In kernel.blk 49, B/REC has been changed from 128 to 1024 which
means that REC/BLK is changed from 8 to 1. Might as well let the
Atari read a whole block at once since it can.
A 44 byte DMA buffer was added along with CLR-DMA to erase it.
CLR-DMA takes a 16 bit address for a parameter. SET-DMA has been
changed to require a 32 bit address in case someone needs it.
These words are found in kernel.blk 51.
HANDLE# is a new word that offsets to the handle from an fcb on
the stack. It works just like MAXREC#. kernel.blk 51
DOS-FCB and DEFAULT have been taken out. kernel.blk 57
SET-ID is a new word in utility.blk 26 that sets the editor's ID
to the control panel date. You must edit this block and replace
" gem" with your initials (should be line 14).
---- Generating and Extending a new kernel
GENERATING a new kernel is easy. Make sure that you have
KERNEL.BLK and META.BLK on the same disk and from inside F83.TOS
type:
OPEN META.BLK <cr>
1 LOAD <cr>
The meta-compiler will load itself and then load the kernel
blocks with whatever changes you have made. When it's finished,
it writes the new KERNEL.TOS to the disk.
EXTENDING a new kernel is also easy. Make sure that you have
EXTEND.BLK, TRAPS.BLK, CPU68000.BLK, and UTILITY.BLK on the same
disk and from inside KERNEL.TOS type:
EXTEND <cr>
1 LOAD <cr>
After extending, a new version of Forth with the standard
features and utilities will be saved to your disk as F83.TOS.
---- Potential Bugs
This forth does have bugs in it. I will continue to try fixing
the ones I know about or any new ones that are found. One reason
for uploading these files was to allow others to help in the
effort. Here is the list:
MULTI No clue for this.
DEBUG I have played with this code and tried to
make all the addresses long but it still
has problems.
CREATE-FILE This works properly for creating files of
1 or 2 blocks. It drops 1 block for any
file over that.
MORE Most likely the reason for the problems in
CREATE-FILE. Also, this could erase blocks
starting with the block that was last
accessed from the currently open file.
Rather than use MORE to add blocks to a file,
it would be safer to create a new file and
convey the blocks to it. At least until this
bug gets fixed.
---- Invitation
There is something of a tradition among Forth users to offer help
in fine-tuning public domain implementations. If you have any
ideas, suggestions, and especially "fixes", I hope you will
continue this tradition by uploading them to this SIG. Also, a
32-bit version of F83 for the Atari ST would be an outstanding
contribution. But in lieu of that, we would like to see graphics
and sound vocabularies as well as anything else specific to the
ST. Finally, I have refrained from uploading the shadow screens
for KERNEL.BLK because of the large size, but will do so as a
separate file should anyone request.
George Morison
70745,1411 CompuServe
əəəəəəəəəəəəəəəəəəəəəəə